using System.Collections.Generic;

public class Table_UIPathItem
{
    /// <summary>
    /// 唯一ID
    /// <summary>
    public int Id { get; private set; }
    /// <summary>
    /// 资源路径
    /// <summary>
    public string Path { get; private set; }
    /// <summary>
    /// 界面类型
    /// <summary>
    public int UIType { get; private set; }
    /// <summary>
    /// 界面Panel数量
    /// <summary>
    public int PanelNum { get; private set; }
    /// <summary>
    /// 返回界面ID
    /// <summary>
    public int ReId { get; private set; }
    /// <summary>
    /// 关闭时是否销毁
    /// <summary>
    public bool Destroy { get; private set; }
    /// <summary>
    /// 切换场景时是否销毁
    /// <summary>
    public bool DestroyUnload { get; private set; }
    /// <summary>
    /// 是否可以通过导航栏返回按钮关闭界面 
    /// <summary>
    public bool IsBackClose { get; private set; }
    /// <summary>
    /// 镜头动画ID
    /// <summary>
    public int CameraMovieId { get; private set; }
    /// <summary>
    /// 界面层级
    /// <summary>
    public int Layer { get; private set; }
    /// <summary>
    /// 背景开关
    /// <summary>
    public int IsShowBg { get; private set; }
    /// <summary>
    /// 背景图片名称
    /// <summary>
    public string SceneBgName { get; private set; }
    /// <summary>
    /// 锁屏遮罩类型
    /// <summary>
    public int LockType { get; private set; }
    /// <summary>
    /// 是否显示3D相机
    /// <summary>
    public int Show3D { get; private set; }
    /// <summary>
    /// 功能开启新手指引ID
    /// <summary>
    public int OpenGuideId { get; private set; }
    /// <summary>
    /// 错误码ID
    /// <summary>
    public int ErrorId { get; private set; }
    /// <summary>
    /// 功能开关ID
    /// <summary>
    public int FuncSwitchId { get; private set; }
    /// <summary>
    /// 是否播放动画
    /// <summary>
    public bool IsPlayTween { get; private set; }
    /// <summary>
    /// 是否需要背景模糊
    /// <summary>
    public int IsFuzz { get; private set; }
    /// <summary>
    /// Ctrl脚本路径
    /// <summary>
    public string ScriptCtrl { get; private set; }
    /// <summary>
    /// view脚本ID
    /// <summary>
    public int LuaObjId { get; private set; }

    public Table_UIPathItem(ExcelLineReader reader)
    {
        Id = reader.ReadInt();
        Path = reader.ReadString();
        UIType = reader.ReadInt();
        PanelNum = reader.ReadInt();
        ReId = reader.ReadInt();
        Destroy = reader.ReadBool();
        DestroyUnload = reader.ReadBool();
        IsBackClose = reader.ReadBool();
        CameraMovieId = reader.ReadInt();
        Layer = reader.ReadInt();
        IsShowBg = reader.ReadInt();
        SceneBgName = reader.ReadString();
        LockType = reader.ReadInt();
        Show3D = reader.ReadInt();
        OpenGuideId = reader.ReadInt();
        ErrorId = reader.ReadInt();
        FuncSwitchId = reader.ReadInt();
        IsPlayTween = reader.ReadBool();
        IsFuzz = reader.ReadInt();
        ScriptCtrl = reader.ReadString();
        LuaObjId = reader.ReadInt();
    }
}

public class Table_UIPathMgr : IDataMgr
{
    protected override string FileName { get { return "Txt/UIPath.txt"; } }

    protected List<Table_UIPathItem> mItemList = new List<Table_UIPathItem>();
    public Table_UIPathItem GetItemByIdx(int idx)
    {
        return mItemList[idx];
    }
    public Table_UIPathItem GetItemById(int id)
    {
        int idx = GetIdxById(id);
        return GetItemByIdx(idx);
    }

    public override void Load(ExcelLineReader reader)
    {
        var item = new Table_UIPathItem(reader);
        mItemDic.Add(item.Id, mDataCount);
        mItemList.Add(item);
    }
}